import request from '@/utils/request'

// 角色
export function roleList(params) {
  return request({
    url: '/manager/api/general/admin/role/list',
    method: 'get',
    params
  })
}

export function addRole(data) {
  return request({
    url: '/manager/api/general/admin/role/add',
    method: 'POST',
    data
  })
}

export function settingSelectData() {
  return request({
    url: '/manager/api/general/admin/role/data/list',
    method: 'get'
  })
}

// 用户
export function userList(params) {
  return request({
    url: '/manager/api/user/role/page',
    method: 'get',
    params
  })
}

export function addUser(data) {
  return request({
    url: '/manager/api/user/role/add',
    method: 'post',
    data
  })
}

export function updateUser(data) {
  return request({
    url: '/manager/api/user/role/update',
    method: 'put',
    data
  })
}

// 门禁点管理
export function guardGroupList(params) {
  return request({
    url: '/manager/api/access/control/passApp/list',
    method: 'get',
    params
  })
}

export function guardDetailList(params) {
  return request({
    url: '/manager/api/access/control/device/list',
    method: 'get',
    params
  })
}

export function groupGurad(params) {
  return request({
    url: `/manager/api/access/control/device/assign/passApp?${params}`,
    method: 'get',
  })
}

// 节假日
export function holidayGroupList(params) {
  return request({
    url: '/manager/api/holidays/rule/list',
    method: 'get',
    params
  })
}

export function holidayDetail(params) {
  return request({
    url: '/manager/api/holidays/rule/detail',
    method: 'get',
    params
  })
}

export function getDictList() {
  return request({
    url: '/api/dict/list',
    method: 'get'
  })
}

// 日志
export function logList(params) {
  return request({
    url: '/manager/api/application/operating/log/list',
    method: 'get',
    params
  })
}


